#ifndef _GAL_DRIVER_H_
#define _GAL_DRIVER_H_

/// <summary>
/// GAL Driver
/// </summary>
typedef struct _Driver
{
	int state;
	int handle;
	void *private;
	const char* name;
	int (*Open)(void);
	int (*CreateCursor)(void);
	int (*ShowCursor)(void);
	int (*HideCursor)(void);
	int (*MoveCursor)(int x, int y);
	int (*DestroyCursor)(void);
	int (*CreateContext)(void);
	int (*MakeCurrent)(ContextPtr ctx);
	int (*DestroyContext)(ContextPtr ctx);
	int (*CreateWindowSurface)(void);
	int (*CreatePixmapSurface)(void);
	int (*CreateDisplaySurface)(void);
	int (*ResizeSurface)(SurfacePtr surface);
	int (*DestroySurface)(SurfacePtr surface);
	int (*SwapSurface)(SurfacePtr surface);
	int (*WaitVSync)(void);
	int (*Close)(void);

} Driver, *DriverPtr;

/// <summary>
/// Driver Pipeline
/// </summary>
int GalDriverProbe(void);
int GalLoadDriver(const char *name);
DriverPtr GalDriver(void);
typedef int (*DriverInit)(DriverPtr drv);
typedef int (*DriverExit)(DriverPtr drv);
#define GET_FUNC(name) 

#endif
